
package com.yundingai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yundingai.domain.entity.AllPlan;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liyuxiang
 * @description 针对表【all_plan】的数据库操作Mapper
 * @createDate 2025-07-16 12:50:48
 * @Entity com.yundingai.domain.entity.AllPlan
 */
@Mapper
public interface AllPlanMapper extends BaseMapper<AllPlan> {
    /**
     * 查询计划
     */
    List<AllPlan> selectPlansByUserId(@Param("userId") Integer userId);
    /**
     * 更新计划
     */
    void updatePlan(AllPlan plan);
    /**
     * 删除计划
     */
    void deletePlan(@Param("planId") Integer planId);

    /**
     * 新增计划
     */
    void addPlan(AllPlan plan);
    /**
     * 获取单个计划
     */
    AllPlan selectPlanById(@Param("planId") Integer planId);

    /**
     * 根据计划名称和用户ID查询计划
     */
    int selectAllPlanByPlanNameAndUserId(@Param("planName") String planName, @Param("userId") Integer userId);


}